<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app" v-cloak>
        <img v-bind:src="imgUrl" alt="">
        <a v-bind:href="href">前往百度</a>
        <a :href="href">我是简写的v-bindss</a>
        <button @click="changeImg">切换图片</button>
    </div>
    <script src="../js/vue.js"></script>
    <script>
        const app = new Vue({
            el:'#app',
            data(){
                return {
                    href:'https://baidu.com',
                    imgUrl:'https://img1.baidu.com/it/u=722430420,1974228945&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500'
                }
            },
            methods:{
                changeImg(){
                    this.imgUrl = 'https://img1.baidu.com/it/u=902830885,4052311299&fm=253&fmt=auto&app=120&f=JPEG?w=889&h=500'
                }
            }
        })
    </script>
</body>
</html>